package se.webbzon.boltzmann.game.event.predefined;

import se.webbzon.boltzmann.effect.Effect;
import se.webbzon.boltzmann.effect.ScreenTransitionEffect;
import se.webbzon.boltzmann.game.event.AbstractGameEvent;
import se.webbzon.boltzmann.game.sequence.Sequence;
import se.webbzon.oschi01.worldarea.WorldArea;
import se.webbzon.oschi01.worldobject.WorldObject;

public class PEIntro implements PredefinedEventFactory {
	
	/*============================================================
	Public Methods
	============================================================*/

	@Override public AbstractGameEvent createEvent(Sequence sequence, WorldObject binding, String argument) {
		return new Intro();
	}
	
	/*============================================================
	Private Classes
	============================================================*/
	
	private static final class Intro extends AbstractGameEvent {

		@Override protected void onBegin(WorldArea world) {
			Effect transition = 
					new ScreenTransitionEffect(	
							ScreenTransitionEffect.FADE + ScreenTransitionEffect.REVERSED,
							"transition_square",90);
			transition.launch(world);
			end();
		}

		@Override protected void onEnd() {};
		
	}

}
